export class cookie{

    /**设置cookie */
    setCookie(name, value, time: number) {
        if (time) {
            const strsec = time * 60 * 60 * 1000;

            const exp = new Date();
            exp.setTime(exp.getTime() + strsec);
            document.cookie =
                name + '=' + escape(value) + ';expires=' + exp.toUTCString();
        } else {
            document.cookie = name + '=' + escape(value);
        }
    }

    test(){
        return 'luoyiming';
    }


}